/**
 * @author lscl
 * @version 1.0
 * @intro:
 */
public class Demo07_值传递和引用传递小练习_02 {
    public static void main(String[] args) {
        String[] arr1 = {"1", "2", "3"};
        String[] arr2 = {"100", "200", "300"};

        test(arr1, arr2);
        System.out.println("-------arr1-------");
        for (int i = 0; i < arr1.length; i++) {
            System.out.print(arr1[i] + ',');                // 1,2,3
        }

        System.out.println();
        System.out.println("-------arr2-------");
        for (int i = 0; i < arr2.length; i++) {             // 100,200,300
            System.out.print(arr2[i] + ',');
        }
    }

        // 0x11  0x22
    public static void test(String[] arr1, String[] arr2) {
        String[] temp;

        // 0x11
        temp = arr1;

        // 0x22
        arr1 = arr2;

        // 0x11
        arr2 = temp;


    }
}
